#include <vector>

using namespace std;

class Solution {
    public:
        void moveZeroes(vector<int>& nums) {
            for(int i = 0,cur = -1;i < nums.size();i++)
                if(nums[i])
                    swap(nums[++cur],nums[i]);
        }
    };